# File Truncator 
#   Clean directories by removing file content, 
#   keeping directories' original structure (files with only name).
# 
# author JamesZBL
# since 2019-10-06

import os

workDir = "."

def truncate():
  for root, dirs, files in os.walk(workDir):
    for f in files:
      if str(f) == 'app.py':
        return
    for f in files:
      fileName = str(f)
      os.system('echo "" > %s/%s' % (root, fileName))

if __name__ == "__main__":
    truncate()
